<import resource="classpath:alfresco/webscripts/org/alfresco/confluence/util/utils.js">

// Connect to remote Alfresco repo info service

// Prepare a remote connector to Alfreso service
var alfInfoServiceUrl = "/api/cmis";

var alfEndpoint = CMISUtils.endpoint.getEndpoint();

var connector = remote.connect(alfEndpoint);

var result = connector.call(alfInfoServiceUrl);

// For this service, we will parse the XML using e4x directly.

// Process xml return

var alfInfo = CMISUtils.xml.getXml(result);

// Get product name and version

var cmisNS = CMISUtils.ns.cmisNS;

var productName = alfInfo..cmisNS::productName;

var productVersion = alfInfo..cmisNS::productVersion;

model.result = productName.toString()+" "+productVersion;

